<style type="text/css">
    .left-panel {
        float: left;
        width: 75%;
    }
    
    .right-panel {
        float: right;
        width: 20%;
        padding-left: 40px;
    }
</style>

<script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/scripts/nicedit/nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() {
	new nicEditor({
		//buttonList : ['bold','italic','underline','upload'],
		iconsPath:'<?php echo Yii::app()->baseUrl; ?>/scripts/nicedit/nicEditorIcons.gif',
		uploadURI : '<?php echo Yii::app()->baseUrl; ?>/scripts/nicedit/nicUpload.php', 
	}).panelInstance('intro');
});
bkLib.onDomLoaded(function() {
	new nicEditor({
		//buttonList : ['bold','italic','underline','upload'],
		iconsPath:'<?php echo Yii::app()->baseUrl; ?>/scripts/nicedit/nicEditorIcons.gif',
		uploadURI : '<?php echo Yii::app()->baseUrl; ?>/scripts/nicedit/nicUpload.php', 
	}).panelInstance('short_intro');
});
</script>
<script type="text/javascript" src="<?php echo Yii::app()->baseUrl ?>/scripts/jquery/jquery.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $("#interested_point_err").hide();
        $("#total_game_err").hide();
        $("#create").click(function(){
            $("#interested_point_err").hide();
            $("#total_game_err").hide();
            total_game = $('#total_game').val();
            if(isNaN(total_game) == true){
                $("#total_game_err").show();
                $("#total_game").focus();
                return false;
            }
            
            interested_point = $('#interested_point').val();
            if(isNaN(interested_point) == true){
                $("#interested_point_err").show();
                $("#interested_point").focus();
                return false;
            }
        });
    });
 
</script>

<form name="create_form" id="create_form" method="POST" action="?r=developer/create" enctype="multipart/form-data">
    <div class="left-panel">
        <h3>Thông tin cơ bản</h3><hr />
        <table border="0">
            <tr>
                <td><label for="normal">Tên nhà phát triển</label></td>
                <td><label for="normal">Trang chủ</label></td>
            </tr>
            <tr>
                <td><input name="name" id="name"  type="text" size="70" style="width:397px"></td>
                <td><input type="text" value="http://" name="homepage" id="homepage" style="width:397px"></td>
            </tr>
            <tr>
                <td><label for="normal">Slug</label></td>
                <td><label for="normal">Địa chỉ</label></td>
            </tr>
            <tr>
                <td><input name="slug" id="slug"  type="text" size="70" style="width:397px"></td>
                <td><input type="text"  name="address" id="address" style="width:397px"></td>
            </tr>
        </table>
        <br />
        <label for="normal">Giới thiệu ngắn</label>
        <textarea  id="short_intro" name="short_intro" rows="5" style="width: 98%"></textarea>
        <label for="normal">Giới thiệu</label>
        <textarea  id="intro" name="intro" rows="9" style="width: 98%"></textarea>
        <br />
        <table border="0">
            <tr>
                <td width="300"> 
                    <label for="normal">Logo</label>
                    <input name="icon" id="icon" value="" type="file" size="20" style="opacity: 0;">
                    <input type ="hidden" name="logo" id="icon_url"/>
                </td>
                    <div style="display:none"><input  name="thumb" id="thumb" type="file"  size="20" style="opacity: 0;"></div>
            </tr>
            <tr>
                <td>     
                    <div><img id="icon_content" src="" style="width:200px;height:200px;margin-top:15px "></img></div>
                    <div id="icon_status"></div>
                </td>
            </tr>
        </table>
        <br />

         <span style="clear:left"></span>

         <br /><br />
         <center>
         <button class="btn" id="create" href="#"><span class="icon16 icomoon-icon-cog"></span> Tạo nhà phát triển</button>
         <button class="btn" id="cancel" href="?r=developer"><span class="icon16 icomoon-icon-cog"></span> Hủy</button>
         </center>
    </div>
    
    
    <div class="right-panel">
        <h3>Thông tin liên quan </h3><hr />
        <label for="normal" style="width:240px">Trạng thái</label>
        <select name="status" id="status" style="opacity: 0;">
            <option value="pending" selected="selected">Pending</option>
            <option value="approved">Approved</option>
            <option value="active">Active</option>
            <option value="blocked">Blocked</option>
        </select><br /><br />
      
        <label for="normal">Bình chọn</label>
        <select name="vote" id="vote" style="opacity: 0;">
            <option value="5" selected="selected">5</option>
            <option value="4">4</option>
            <option value="3">3</option>
            <option value="2">2</option>
            <option value="1">1</option>
        </select><br /><br />
	<label for="normal">Tổng số Game</label>
        <input type="text" name="total_game" id="total_game" style="width:185px"/>
        <label id="total_game_err" style="display:none;color:red;">Chỉ được nhập số nguyên</label>
        <br /><br />
        <label for="normal">Điểm hấp dẫn</label>
        <input type="text" name="interested_point" id="interested_point" style="width:185px"/>
        <label id="interested_point_err"  style="display:none;color:red;">Chỉ được nhập số nguyên</label>
        <br /><br />
    </div>
    <span style="clear: both"></span>
</form>